import payOrderApi from '@/api/declaration/pay/payOrderApi'
import httpRequest from '@/config/axios/httpRequest'
import { OrderExportReqModel, OrderPageReqModel } from '@/models/pay/OrderModel'


// 查询列表支付订单
export const getOrderPage = async (params: OrderPageReqModel) => {
  return await httpRequest.get(payOrderApi.GetOrderPage, { params })
}

// 查询详情支付订单
export const getOrder = async (id: number, sync?: boolean) => {
  return await httpRequest.get(payOrderApi.GetOrder, { params: { id, sync } })
}

// 获得支付订单的明细
export const getOrderDetail = async (id: number) => {
  return await httpRequest.get(payOrderApi.GetOrderDetail, { params: { id } })
}

// 提交支付订单
export const submitOrder = async (data: any) => {
  return await httpRequest.post(payOrderApi.SubmitOrder, data)
}

// 导出支付订单
export const exportOrder = async (params: OrderExportReqModel) => {
  return await httpRequest.get(payOrderApi.ExportOrder, { params })
}
